package com.atguigu.Controller;

import com.atguigu.Serivce.OrdersService;
import com.atguigu.Utils.R;
import com.atguigu.pojo.Orders;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping("order")
public class OrdersController {
    @Autowired
    private OrdersService ordersService;

    @PostMapping("submit")
    public R submit(@RequestBody Orders orders) {
           return ordersService.submit(orders);
    }
}
